import java.util.Scanner;
public class Main
{
	public static void main(String args[])
	{
		System.out.println("请输入学生数量：")
		Scanner scanner=new Scanner(System.in);
		int n=scanner.nextInt();
		int scores[]=new int[];
		System.out.println("请输入各个学生的成绩（用空格分隔开）：");
		for(int i=0;i<n;i++)
		{
			int x=scanner.nextInt();
			scores[i]=x;
		}
		int nax=scores[0];
		for(int i=0;i<scores.length;i++)
		{
			if(scores[i]>max)
			{
				max=scores[i];
			}
		}
		System.out.println("最高分："+max);
		double sum;
		for(int i=0;i<scores.length;i++)
		{
			sum+=scores[i];
		}
		System.out.println("平均分："+sum/n);
		int a=0,b=0,c=0,d=0,e=0;
		for(int i=0;i<scores.length;i++)
		{
			if(scores[i]>=90)
				a++;
			else if(scores[i]<90&&scores[i]>=80)
				b++;
			else if(scores[i]<80&&scores[i]>=70)
				c++;
			else if(scores[i]<70&&scores[i]>=60)
				d++;
			else if(scores[i]<60)
				e++;
		}
		System.out.println("优"+a);
		System.out.println("良"+b);
		System.out.println("中"+c);
		System.out.println("及格"+d);
		System.out.println("不及格"+e);
	}
}